Image size reduction method and system

ABSTRACT

A system and method for reducing a size of an image. The invention comprises a system for rotating the image in a first direction using a rotation algorithm to generate an intermediate reduced image; a system for rotating the intermediate reduced image in a direction opposite the first direction using the rotation algorithm to generate a final reduced image; and wherein the rotation algorithm uses weighted sums of neighboring pixels in the image prior to rotation to calculate new pixel values. The invention may also comprise an enhancement system for boosting contrast of the final reduced image.

BACKGROUND OF THE INVENTION

1. Technical Field

The present invention relates generally to imaging systems and more particularly relates to an image reduction system and method that utilizes an image rotation algorithm to achieve a reduced image.

2. Related Art

As devices that utilize digital imaging systems (e.g., scanners, digital cameras, etc.) become more popular, a demand for robust applications that can manipulate digital images has been created. One such application involves image scaling, where for instance, the size of an image is reduced. Available applications range from very simple algorithms that are highly lossy to very complex algorithms that are very sophisticated.

An example of a very sophisticated system may, for example, process a high order surface that is fitted with incoming data, which is then re-sampled. Unfortunately, such sophisticated algorithms become increasingly difficult to implement for small image size reductions, e.g., an image size reduction from 200 pels (picture elements or pixels) to 180 pels. Such systems may therefore be too costly or too slow to implement.

An example of a very simple system may utilize half-scaling, where every other pixel is discarded. When such a system is applied to only slightly reduce an image, e.g., where every tenth pixel has been discarded, unacceptable distortions or artifacts may be introduced into the reduced image.

Accordingly, a need exists for an image reduction system that can efficiently provide small image size reductions without introducing unwanted distortions or computational costs.

SUMMARY OF THE INVENTION

The present invention addresses the above-mentioned issues, as well as others, by providing a system and method for reducing an image. In a first aspect, the invention provides a system for reducing a size of an image, comprising: a system for rotating the image in a first direction using a rotation algorithm to generate an intermediate reduced image; a system for rotating the intermediate reduced image in a direction opposite the first direction using the rotation algorithm to generate a final reduced image; and wherein the rotation algorithm uses weighted sums of neighboring pixels in the image prior to rotation to calculate new pixel values.

In a second aspect, the invention provides a program product stored on a recordable medium for reducing a size of an original image, comprising: means for rotating the original image in a first direction to generate an intermediate reduced image; means for rotating the intermediate reduced image in a direction opposite the first direction to generate a final reduced image; and wherein the means for rotating the original and intermediate reduced image use weighted sums of neighboring pixels in the image prior to rotation to calculate new pixel values.

In a third aspect, the invention provides a method of reducing a size of an image, comprising: providing an original image having W1 pixels in each row; generating an intermediate reduced image having a reduced number of pixels W2 in each row, wherein W2 is less than W1, and wherein for each pixel 1 to W2 in each row, pixel values are calculated based on weighted sums of neighboring pixels in the original image; and generating a further reduced image having W3 pixels in each row, wherein W3 is less than W2, and wherein for each pixel 1 to W3 in each row, pixel values are calculated based on weighted sums of neighboring pixels in the intermediate reduced image.

In a fourth aspect, the invention provides a system for reducing a size of an original image, wherein the original image has a predetermined number of pixels W1 in a row, the system comprising: a system for generating an intermediate reduced image having a reduced number of pixels W2 in the row, wherein W2 is less than W1, and wherein for each pixel 1 to W2 in the row, pixel values are calculated based on weighted sums of neighboring pixels in the original image; and a system for generating a further reduced image having a reduced number of pixels W3 in the row, wherein W3 is less than W2, and wherein for each pixel 1 to W3 in the row, pixel values are calculated based on weighted sums of neighboring pixels in the intermediate reduced image.

BRIEF DESCRIPTION OF THE DRAWINGS

The embodiments of this invention will be described in detail, with reference to the following figures, wherein like designations denote like elements, and wherein:

FIG. 1 shows a block diagram of an image reduction system in accordance with the invention.

FIG. 2 shows a exemplary initial and target image in accordance with the invention.

FIG. 3 shows a neighboring pixel configuration in accordance with the invention.

DETAILED DESCRIPTION OF THE INVENTION

Referring now to the drawings, FIG. 1 depicts a reduction system 14 embodied in a computer system 10. Computer system 10 receives: (1) an original image 28, having original pixel coordinates 29; and (2) a set of reduced pixel coordinates 30, and outputs a reduced image 32 having the reduced pixel coordinates 30. Thus, for example, the coordinates of the original image 28 may be 201 pixels in width by 231 pixels in height, and the resulting reduced image may be 187 pixels in width by 214 pixels in height. The present invention allows for near continuous image scaling with virtually no loss of information. Thus, for instance, the image size can be reduced so that the resulting image pixel coordinates are multiples of eight, as required for JPEG image compression. It should be appreciated that while in most cases the amount of pixel reduction will be symmetrical with respect to width and height (e.g., 7% in both directions), any reduced pixel coordinates 30 may be inputted, including ones that cause a non-symmetrical result. Thus, the inputted reduced pixel coordinates 30 may be received in any format, e.g., as pixel dimensions such as 187×214, as a reduction percentage such as 10%, etc. It should also be understood that for the purposes of this disclosure, the term “pixel” is synonymous with, and may refer to, any type of picture element, data element, image element, etc.

Computer system 10 generally comprises a processor 24, input/output (I/O) interfaces 26, memory 12, bus 34, and external devices/resources (not shown). Memory 12 may comprise any known type of data storage and/or transmission media, including magnetic media, optical media, random access memory (RAM), read-only memory (ROM), a data cache, a data object, etc. Moreover, memory 12 may reside at a single physical location, comprising one or more types of data storage, or be distributed across a plurality of physical systems in various forms. Processor 24 may likewise comprise a single processing unit, or be distributed across one or more processing units in one or more locations, e.g., on a client and server.

I/O interfaces 26 may comprise any system for exchanging information from an external source. External devices that can interface with computer system 10 may comprise any known type of external device, including a CRT, LED screen, hand-held device, keyboard, mouse, voice recognition system, speech output system, printer, facsimile, pager, personal digital assistant, cellular phone, web phone, etc. Bus 34 provides a communication link between the components in the computer system 10 and likewise may comprise any known type of transmission link, including electrical, optical, wireless, etc. In addition, although not shown, additional components, such as cache memory, communication systems, system software, etc., may be incorporated into computer system 10.

Communication with computer system 10 may occur in any known fashion, e.g., a direct terminal connected to the computer system 10, or a remote workstation in a client-server environment. In the case of the latter, the client and server may be connected via the Internet, wide area networks (WAN), local area networks (LAN) or other private networks. The server and client may utilize conventional token ring connectivity, Ethernet, or other conventional communications standards. Where the client is connected to the system server via the Internet, connectivity could be provided by conventional TCP/IP sockets-based protocol.

Stored in memory 12 is a reduction system 14 and an enhancement system 22. Although generally shown as software, it should be appreciated that some or all of the functionality of the systems could be implemented with hardware in the form of, e.g., an ASIC (Application Specific Integrated Circuit) device or a FPGA (Field Programmable Gate Array). Reduction system 14 causes the original image 28 to be reduced to a size dictated by the inputted reduced pixel coordinates 30. Enhancement systems 22 enhances any contrast reduction that may have resulted from the size reduction.

Reduction system 14 generally comprises a reduction algorithm 16, a pixel selection system 18, and a system for computing and/or storing constant K values 20. Reduction algorithm 16 reduces the original image by rotating the image in a first direction (Rotation System A), and then rotating the image in a second direction (Rotation System B). According to reduction algorithm 16 detailed below, each rotation causes a size reduction that is proportional to the angle of rotation. Specifically, an image width can be reduced from W₁ pixels to W₂ pixels by rotating the image to an angle α in accordance with the equation cos α=(W₂/W₁), or

W₂=W₁ cos α. Similarly, an image height is reduced from H₁ pixels to H₂ pixels according to the equation cos α=(H₂/H₁), or H₂=H₁ cos α. In the present embodiment, the image is rotated twice (e.g., clockwise and then counterclockwise), so that the final reduced image is returned to its original position. Accordingly, the image may be first rotated α/2 in a first direction, and then α/2 in the opposite direction to achieve the desired reduction. Thus, using the two step process, the image width will be reduced from W₁ pixels to W₂ pixels to W₃ pixels, where W₁>W₂>W₃, and the image height will be reduced from H₁ pixels to H₂ pixels to H₃ pixels, where H₁>H₂>H₃.

Where no skewing is desired between the original image 28 and the reduced image 32, W₂ and H₂ can be readily determined. For instance, for relatively small rotations, the desired reduction can be achieved by selecting W₂ and H₂ to be approximately a mid-point, e.g., W₂≠½(W₁+W₃). As the amount of rotation increases, W₂ and H₂ will deviate more from the mid-point. In addition, if there is a skewing issue, then W₂ can be can be adjusted accordingly, i.e., the amount of rotation in the first and second direction can be made unequal to compensate for the skew. For instance, if the original image having pixel coordinates of W₁ and H₁ was skewed 3 degrees clockwise, and a 33 degree total rotation was desired to achieve W₃ and H₃, the first rotation could be 18 degrees counterclockwise, followed by a second clockwise rotation of 15 degrees.

To achieve the desired reduction result, new pixel values are calculated in a two step process. The first calculation reduces the number of pixels P₁ in the original image, i.e., W₁×H₁, to an intermediate reduced image having P₂ pixels, i.e., W₂×H₂, (first rotation). The second calculation reduces the number of pixels in the intermediate reduced image, i.e., P₂ pixels, to the final reduced image 32 having P₃ pixels, i.e., W₃×H₃, (second rotation). The reduction/rotation algorithm for both steps calculates each new pixel in a target image using weighted sums of neighboring pixels in the initial image. An exemplary algorithm for reducing an initial image to a target image may be implementing as follows: V_(o) = K_(h) * K_(v)(V₁ + V₄ − V₂ − V₃) + K_(h)(V₃ − V₄) + K_(v)(V₂ − V₄) + V₄,

where V₀ is the new pixel value calculated for each pixel in the target image; V₁, V₂, V₃ and V₄ are neighboring pixels of the initial image that incorporate a portion of V₀; and K_(h) and K_(v) are fractions that are functions of: (1) the number/coordinates of pixels in the target image, and (2) the position of the current pixel V₀ in the target image.

FIG. 2 depicts an example of a resulting target image superimposed on an initial image 42. As can be seen, the target image 40 has been rotated by an angle α to effectuate some reduction. In this case it can be seen that a new pixel value V₀ (in the target image) is calculated as a function of the neighboring pixels V₁, V₂, V₃ and V₄ in the initial image. The process of identifying which neighboring pixels will be used for the calculation of V₀ is determined by pixel selection system 18 (FIG. 1). By knowing the angle of rotation α, it is a trivial process to identify the position of V₀ relative to the pixels of the initial image 42, and therefore identify the neighboring pixels. Pixel selection system 18 can be implemented in any known manner.

Constants K_(h) and K_(v) comprise incremental values between 0 and 1, which may be obtained from a table or generated dynamically. In an exemplary embodiment of the invention, K_(h) and K_(v) are implemented in ⅛th increments, i.e., ⅛, ¼, ⅜, ½, ⅝, ¾, ⅞ and 8/8. K_(h) values provide horizontal fractions (for each X coordinate in columns C₀ to C_(N), where N is an integer), and K_(v) values provide vertical fractions (for Y coordinate in rows R₀ to R_(M)). Increments of K_(h) and K_(v) are assigned to segments of pixels, for example, by dividing the number of pixels in each row or column of the image by eight (8). Thus, for example, a target image having a width of 80 pixels would have 10 pixels in each segment, i.e., 80/8=10. Thus, for pixels 1–10 (i.e., pixels corresponding to columns C₀ to C₉), K_(h)=⅛; for pixels 11–20, K_(h)= 2/8; for pixels 21–30, K_(h)=⅜, and so on. In the case where the target number of pixels is not divisible by eight, the distribution may be made as close as possible to provide even segments.

If the initial image has perpendicular sides, values for K_(v) may be determined by the same formula as K_(h). That is, horizontal rows 1–10 (i.e., rows R₀₋₉) of pixels, K_(v)=⅛; rows 11–20, K_(v)=¼; rows 21–30, K_(v)=⅜, and so on. As horizontal rows are extracted the vertical (R₀ to R_(M)) coordinate is incremented by one up or down depending on the direction of extraction, which allows for determination of an appropriate K_(v) fraction.

If the initial image does not have perpendicular sides, increment numbers will vary for K_(h) and K_(v) depending on their respective skew angle. That is, values of K_(h) and K_(v) will be provided according to the respective skew angle in the respective horizontal and vertical directions.

The appropriate values for K_(h) and K_(v) may be stored in at least one lookup table based on the coordinates of the target image and pixel locations. Alternatively, K_(h) and K_(v) can be generated dynamically based on the inputted amount of size reduction, e.g., by dividing the vertical and horizontal coordinates of the reduced image by the number of desired segments (e.g., eight), and assigning fractions to each segment. This calculation could be calculated ahead of time when the amount of size reduction is first inputted, stored in a table, and downloaded to the hardware device to improve run-time speeds. As a further alternative, since the reduction can be associated with a skew angle, a lookup table may be based on skew angle. An exemplary K_(h) lookup table for a target image having 80 pixels in width may take a form as follows:

SEGMENT: 1 2 3 . . . 8 Pixels:  1–10 11–20 21–30 . . . 71–80 K_(h) value: ⅛ 2/8 ⅜ . . . 8/8 A similar table could be implemented for K_(v). The rotation system outlined herein is described in further detail in co-pending patent application, U.S. Ser. No. 09/816,318, filed on Mar. 28, 2001, entitled IMAGE ROTATION WITH SUBSTANTIALLY NO ALIASING ERROR, which is hereby incorporated by reference. It should be understood that the use of eight segments is for exemplary purposes only, and other values may be used.

The process of rotating the image in opposite directions can be achieved by altering the location order of the neighboring pixels V₁, V₂, V₃ and V₄. Examples of this are shown in FIG. 3. For example, for counter clockwise rotation, the pixels are located as: Quadrant 1: V₄, Quadrant 2: V₂, Quadrant 3: V₁, and Quadrant 4: V₃. For clockwise rotation, the pixels are located as: Quadrant 1: V₁, Quadrant 2: V₃, Quadrant 3: V₄, and Quadrant 4: V₂.

As noted above, enhancement system 22 is provided to improve contrast lost during the reduction process. Enhancement system 22 may include, for instance, a lookup table having values that will boost the dynamic range of the image. Specifically, the reduction of video gradients can be recovered via well-known image transformation techniques.

It is understood that the present invention can be realized in hardware, software, or a combination of hardware and software. Moreover, computer system 10 according to the present invention can be realized in a centralized fashion in a single computerized workstation, or in a distributed fashion where different elements are spread across several interconnected systems (e.g., a network). Any kind of computer/server system(s)—or other apparatus adapted for carrying out the methods described herein—is suited. A typical combination of hardware and software could be a general purpose computer system with a computer program that, when loaded and executed, controls computer system 10 such that it carries out the methods described herein. Alternatively, a specific use computer, containing specialized hardware for carrying out one or more of the functional tasks of the invention could be utilized. The present invention can also be embedded in a computer program product, which comprises all the features enabling the implementation of the methods described herein, and which—when loaded in a computer system—is able to carry out these methods. Computer program, software program, program, or software, in the present context mean any expression, in any language, code or notation, of a set of instructions intended to cause a system having an information processing capability to perform a particular function either directly or after either or both of the following: (a) conversion to another language, code or notation; and/or (b) reproduction in a different material form.

The foregoing description of the embodiments of this invention has been presented for purposes of illustration and description. It is not intended to be exhaustive or to limit the invention to the precise form disclosed, and obviously, many modifications and variations are possible. Such modifications and variations that may be apparent to a person skilled in the art are intended to be included within the scope of this invention as defined by the accompanying claims. 

1. A system for reducing a size of an image, comprising: a system for rotating the image in a first direction using a rotation algorithm to generate an intermediate reduced image; a system for rotating the intermediate reduced image in a direction opposite the first direction using the rotation algorithm to generate a final reduced image; and wherein the rotation algorithm uses weighted sums of neighboring pixels in the image prior to rotation to calculate new pixel values, and wherein the rotation algorithm calculates each new pixel value using the formula: V_(o) = K_(h) * K_(v)(V1 + V4 − V2 − V3) + K_(h)(V3 − V4) + K_(v)(V2 − V4) + V4, wherein, V₀ comprises a rotated data point: V1, V2, V3 and V4 comprise neighboring data points in the image prior to rotation; and K_(h) and K_(v) comprise constant values calculated as a function of pixel locations of the rotated image.
 2. The system of claim 1, wherein K_(h), and K_(v) are stored in a table.
 3. The system of claim 1, wherein an amount of size reduction is proportional to an amount of rotation implemented by the rotation algorithm.
 4. The system of claim 1, further comprising an enhancement system to boost a dynamic range of the image after the second reduction.
 5. The system of claim 1, wherein the final reduced image comprises a total number of pixels that is a multiple of eight.
 6. A program product stored on a computer readeable medium for reducing a size of an original image, comprising: means for rotating the original image in a first direction to generate an intermediate reduced image; means for rotating the reduced image in a direction opposite the first direction to generate a final reduced image; and wherein the means for rotating the original and intermediate reduced image use weighted sums of neighboring pixels in the image prior to rotation to calculate new pixel values, and wherein the means for rotating the original and reduced image uses the formula: V_(o) = K_(h) * K_(v)(V1 + V4 − V2 − V3) + K_(h)(V3 − V4) + K_(v)(V2 − V4) + V4, wherein V₀ comprises a new pixel: V1, V2, V3 end V4 comprise neighboring pixels in the image prior to rotation; and K_(h) and K_(v) comprise constant values calculated as a function of a pixel locations of the rotated image.
 7. The program product of claim 6, wherein K_(h) and K_(v) are stored in a table.
 8. The program product of claim 6, wherein an amount of size reduction is proportional to an amount of rotation.
 9. The program product of claim 6, further comprising enhancement means to boost a dynamic range of the final reduced image.
 10. A method of reducing a size of an image, comprising: providing an original image having W1 pixels in each row; generating an intermediate reduced image having W2 pixels in each row, wherein W2 is less than W1, and wherein for each pixel 1 to W2 in each row, pixel values are calculated based on weighted sums of neighboring pixels in the original image; generating a further reduced image having W3 pixels in each row, wherein W3 is less than W2, and wherein for each pixel 1 to W3 in each row, pixel values are calculated based on weighted sums of neighboring pixels in the intermediate reduced image; enhancing the further reduced image to boost a dynamic range of the further reduced image; and wherein the step of calculating pixel values based on weighted sums of neighboring pixels in the original image untilizes the formula: W2_(o) = K_(h) * K_(v)(V1 + V4 − V2 − V3) + K_(h)(V3 − V4) + K_(v)(V2 − V4) + V4, wherein, W2 _(o) comprises a calculated pixel; V1, V2, V3 and V4 comprise neighboring pixels in the original image; and K_(h) and K_(v) comprise constant values calculated as a function of the number of pixels W2.
 11. The method of claim 10, wherein the constant values K_(h) and K_(v) are further calculated as a function of the location of W2 _(o) in a row of W2 pixels.
 12. The method of claim 10, wherein the reduced number of pixels W2 is a multiple of eight.
 13. A system for reducing a size of an original image, wherein the original image has a predetermined number of pixels W1 in a row, the system comprising: a system for generating an intermediate reduced image having a reduced number of pixels W2 in the row, wherein W2 is less than W1, and wherein for each pixel 1 to W2 in the row, pixel values are calculated based on weighted sums of neighboring pixels in the original image; and a system for generating a further reduced image having a reduced number of pixels W3 in the row, wherein W3 is less than W2, and wherein for each pixel 1 to W3 in the row, pixel values are calculated based on weighted sums of neighboring pixels in the intermediate reduced image; wherein the pixel values are calculated with the formula: W2_(o) = K_(h) * K_(v)(V1 + V4 − V2 − V3) + K_(h)(V3 − V4) + K_(v)(V2 − V4) + V4, wherein, W2 _(o) comprises a calculated pixel; V1, V2, V3 and V4 comprise neighboring pixel in the original image; and K_(h) and K_(v) comprise constant values calculated as a function of the number of pixels W1.
 14. The system of claim 13, further comprising: an enhancement system to boost a dynamic range of the further reduced image.
 15. The system of claim 13, wherein the constant values K_(h) and K_(v) are further calculated as a function of the location of W2 _(o) in the row of W2 pixels.
 16. The system of claim 13, wherein the reduced number of pixels W3 is a multiple of eight. 